package com.dotflat.delegation.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Data
@Table(name = "tb_delegation_feed")
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class FeedDelegation extends AreableObjectBase {

    @Column(columnDefinition = " varchar(32)  COMMENT '宝宝id'")
    private String childrenId;

    @Column(columnDefinition = " varchar(32)  COMMENT '宝宝名字'")
    private String childName;

    @Column(columnDefinition = " varchar(32)  COMMENT '家长id'")
    private String parentId;

    @Column(columnDefinition = " varchar(32)  COMMENT '家长id'")
    private String date;

    @Column(columnDefinition = "varchar(1024)  COMMENT '照片'")
    private String medias = "";

    @Column(columnDefinition = " varchar(255)  COMMENT '描述'")
    private String content = "";

    @Column(columnDefinition = " bit(1) default 0 COMMENT '是否标记为已处理'", nullable = false)
    private Boolean processed = false;

    @Override
    @JsonIgnore
    public boolean isOwnerOnly(){
        return true;
    }
}
